import type { MAINTENANCE_RESULT } from './constant'

export interface QueryParams {
  name?: string
  num?: string
  time?: string
  /** 维护类型 */
  type?: string
  result?: MAINTENANCE_RESULT
  pageNumber: number
  pageSize: number
}

export interface ListItem {
  [key: string]: any
  equipmentId: number
  /** 维护类型 */
  type: string
  typeName: string
  name: string
  num: string
  manufacturer: string
  installationTime: string
  installationAddr: string
  time: string
  executeTime: string
  result: MAINTENANCE_RESULT
  executeUser: string
}

export interface SaveParams extends Omit<
  ListItem,
  'typeName' | 'name' | 'num' | 'manufacturer' | 'installationTime' | 'installationAddr'
> {
  /** 维护内容 */
  content: string
  /** 维护原因 */
  reason: string
  /** 备注 */
  remark: string
}
